﻿package cunkuan;
public class Person implements Runnable {
	private Bank a= new Bank();

	public void run() {
		for (int i = 0; i < 3; i++) {
			cun();
		}
	}

	private synchronized void cun() {
		try {
			Thread.sleep(500);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		a.cunqian();
		System.out.println(Thread.currentThread().getName() + "存入100元" + "\t"+ a.toString());
	}
}